import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = {"LogoutServlet"})
public class LogoutServlet extends HttpServlet {

    protected void service(HttpServletRequest request,
                           HttpServletResponse response) throws IOException {
        request.getSession().invalidate();
        response.sendRedirect("https://cas.dgut.edu.cn/logout?callback=http://localhost:8080/Loging.jsp");
    }
}
